//
//  UpTopCollectionViewCell.m
//  KidReading
//
//  Created by YangShuai on 16/11/10.
//  Copyright © 2016年 刘赞黄Telen. All rights reserved.
//

#import "UpTopCollectionViewCell.h"
#import "ConstDefine.h"

@interface UpTopCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIButton *actionButton;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *nameLabelTop;

@end

@implementation UpTopCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    _iconImageView.layer.cornerRadius = 45;
    _iconImageView.layer.masksToBounds = YES;;
    //
    _iconImageView.layer.borderColor = [UIColor whiteColor].CGColor;
    _iconImageView.layer.borderWidth = 2;
    //
    _iconImageView.layer.shadowColor = [UIColor colorWithHexString:@"#757575"].CGColor;
    _iconImageView.layer.shadowOffset = CGSizeMake(30, 3);
    //
    [_actionButton addTouchScaleTransitions_forView:self];
    if ([DataProcessing shareSingle].deviceType == DevicesTypes_iPhone) {
        CGFloat ratio_phone = [DataProcessing shareSingle].ratio_iPhone_w;
        _nameLabel.font = [UIFont systemFontOfSize:10 / ratio_phone];
        _iconImageView.layer.cornerRadius = 30 / ratio_phone;
        _nameLabelTop.constant = 5 / ratio_phone;
    }
}
//
- (IBAction)tapCellAction:(id)sender {
    if (_tapCellBlock) {
        _tapCellBlock(self);
    }
}



@end
